import React from 'react';

export class Hello extends React.Component {
  render() {
    // this.props.name = 'xxx';
    // 不推荐
    // this.props.obj.name = 'xxx';
    console.log(this.props);
    return (
      <div>
        <h1>下面是传入组件的数据：</h1>
        <h3>我叫:{this.props.name}</h3>
        <h3>我今年:{this.props.age}岁</h3>
        <h3>我喜欢:{this.props.likes.join('=>')}</h3>
        <h3>
          我对象:{this.props.obj.name},{this.props.obj.age}
        </h3>
        <h3>执行个函数吧: {this.props.fn()}</h3>
        <div>传递个JSX吧: {this.props.jsx}</div>
      </div>
    );
  }
}
export default Hello;
